<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../../style.css" type="text/css" media="screen">
<link rel="stylesheet" href="../../print.css" type="text/css" media="print">
<meta content="CJMath,idv.cjcat.CJMath,between,clamp,cos,interpolate,linearLoop,prob,pseudoGaussian,randomInt,setPrecision,sin,uniformSample" name="keywords">
<title>idv.cjcat.CJMath</title>
</head>
<body>
<script type="text/javascript" language="javascript" src="../../asdoc.js"></script><script type="text/javascript" language="javascript" src="../../cookies.js"></script><script type="text/javascript" language="javascript">
<!--
				asdocTitle = 'CJMath - API Documentation';
				var baseRef = '../../';
				window.onload = configPage;
			--></script>
<table style="display:none" id="titleTable" cellspacing="0" cellpadding="0" class="titleTable">
<tr>
<td align="left" class="titleTableTitle">CJLibrary</td><td align="right" class="titleTableTopNav"><a onclick="loadClassListFrame('../../all-classes.html')" href="../../package-summary.html">All&nbsp;Packages</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../all-classes.html')" href="../../class-summary.html">All&nbsp;Classes</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../index-list.html')" href="../../all-index-A.html">Index</a>&nbsp;|&nbsp;<a href="../../index.html?idv/cjcat/CJMath.html&amp;idv/cjcat/class-list.html" id="framesLink1">Frames</a><a onclick="parent.location=document.location" href="" style="display:none" id="noFramesLink1">No&nbsp;Frames</a></td><td rowspan="3" align="right" class="titleTableLogo"><img alt="Adobe Logo" title="Adobe Logo" class="logoImage" src="../../images/logo.jpg"></td>
</tr>
<tr class="titleTableRow2">
<td align="left" id="subTitle" class="titleTableSubTitle">Class&nbsp;CJMath</td><td align="right" id="subNav" class="titleTableSubNav"><a href="#methodSummary">Methods</a></td>
</tr>
<tr class="titleTableRow3">
<td colspan="2">&nbsp;</td>
</tr>
</table>
<script type="text/javascript" language="javascript">
<!--
if (!isEclipse() || window.name != ECLIPSE_FRAME_NAME) {titleBar_setSubTitle("Class CJMath"); titleBar_setSubNav(false,false,false,false,false,false,true,false,false,false,false,false,false,false);}
--></script>
<div class="MainContent">
<table cellspacing="0" cellpadding="0" class="classHeaderTable">
<tr>
<td class="classHeaderTableLabel">Package</td><td><a onclick="javascript:loadClassListFrame('class-list.html')" href="package-detail.html">idv.cjcat</a></td>
</tr>
<tr>
<td class="classHeaderTableLabel">Class</td><td class="classSignature">public class CJMath</td>
</tr>
</table>
<p></p>
  The <code>CJMath</code> class contains some useful mathematical functions.
  <p></p>
<br>
<hr>
</div>
<a name="methodSummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Public Methods</div>
<table id="summaryTableMethod" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Method</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#between()">between</a>(value:Number, min:Number, max:Number, openMin:Boolean = false, openMax:Boolean = false):Boolean</div>
<div class="summaryTableDescription">[static]
   Checks if a value is the lower and upper bounds.</div>
</td><td class="summaryTableOwnerCol">CJMath</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#clamp()">clamp</a>(input:Number, lowerBound:Number, upperBound:Number):Number</div>
<div class="summaryTableDescription">[static]
   Clamps a value between bounds.</div>
</td><td class="summaryTableOwnerCol">CJMath</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#cos()">cos</a>(phase:Number, radius:Number = 1, offset:Number = 0):Number</div>
<div class="summaryTableDescription">[static]
   Cosine function with more parameters.</div>
</td><td class="summaryTableOwnerCol">CJMath</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#interpolate()">interpolate</a>(x1:Number, y1:Number, x2:Number, y2:Number, x3:Number, usePercentage:Boolean = false):Number</div>
<div class="summaryTableDescription">[static]
   Interpolates between/beyond (x1, y1) and (x2, y2).</div>
</td><td class="summaryTableOwnerCol">CJMath</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#linearLoop()">linearLoop</a>(x1:Number, y1:Number, x2:Number, y2:Number, x3:Number, usePercentage:Boolean = false):Number</div>
<div class="summaryTableDescription">[static]
   Interpolates between (x1, y1) and (x2, y2).</div>
</td><td class="summaryTableOwnerCol">CJMath</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#prob()">prob</a>(p:Number):Boolean</div>
<div class="summaryTableDescription">[static]
   Returns a Boolean value, with a probability equal to true.</div>
</td><td class="summaryTableOwnerCol">CJMath</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#pseudoGaussian()">pseudoGaussian</a>(mean:Number, deviation:Number, iterations:int = 3):Number</div>
<div class="summaryTableDescription">[static]
   Simulates Gaussian sample distribution.</div>
</td><td class="summaryTableOwnerCol">CJMath</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#randomInt()">randomInt</a>(max:uint):int</div>
<div class="summaryTableDescription">[static]
   
   </div>
</td><td class="summaryTableOwnerCol">CJMath</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#setPrecision()">setPrecision</a>(value:Number, digit:int, includeInteger:Boolean = false):Number</div>
<div class="summaryTableDescription">[static]
   Sets the decimal         precision of a Number.</div>
</td><td class="summaryTableOwnerCol">CJMath</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#sin()">sin</a>(phase:Number, radius:Number = 1, offset:Number = 0):Number</div>
<div class="summaryTableDescription">[static]
   Sine function with more parameters.</div>
</td><td class="summaryTableOwnerCol">CJMath</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#uniformSample()">uniformSample</a>(mean:Number, deviation:Number, usePercent:Boolean = true):Number</div>
<div class="summaryTableDescription">[static]
   Evenly distributed sample.</div>
</td><td class="summaryTableOwnerCol">CJMath</td>
</tr>
</table>
</div>
<script type="text/javascript" language="javascript">
<!--
showHideInherited();
--></script>
<div class="MainContent">
<a name="methodDetail"></a>
<div class="detailSectionHeader">Method detail</div>
<a name="between()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">between</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td>
</tr>
</table>
<div class="detailBody">
<code>public static function between(value:Number, min:Number, max:Number, openMin:Boolean = false, openMax:Boolean = false):Boolean</code><p>
   Checks if a value is the lower and upper bounds.
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">value</span>:Number</code> &mdash;    Value to be checked
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">min</span>:Number</code> &mdash;      Lower bound.
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">max</span>:Number</code> &mdash;      Higher bound.
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">openMin</span>:Boolean</code> (default = <code>false</code>)<code></code> &mdash;  Whether the lower bound is open.
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">openMax</span>:Boolean</code> (default = <code>false</code>)<code></code> &mdash;  Whether the upper bound is open.
   </td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>Boolean</code> &mdash; Whether the value is between the lower and upper bounds.
   </td>
</tr>
</table>
</div>
<a name="clamp()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">clamp</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public static function clamp(input:Number, lowerBound:Number, upperBound:Number):Number</code><p>
   Clamps a value between bounds.
   
   <div class='listing'><pre>
   import idv.cjcat.CJMath;
   trace(CJMath.clamp(5, 3, 7));  //outputs 5
   trace(CJMath.clamp(1, 3, 7));  //outputs 3
   trace(CJMath.clamp(9, 3, 7));  //outputs 7</pre></div>
   
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">input</span>:Number</code> &mdash;       Original value.
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">lowerBound</span>:Number</code> &mdash;  Lower bound.
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">upperBound</span>:Number</code> &mdash;  Upper bound.
   </td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>Number</code> &mdash; The original value clamped between two bounds.
   </td>
</tr>
</table>
</div>
<a name="cos()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">cos</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public static function cos(phase:Number, radius:Number = 1, offset:Number = 0):Number</code><p>
   Cosine function with more parameters.
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">phase</span>:Number</code> &mdash;   Phase of the Cosine function.
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">radius</span>:Number</code> (default = <code>1</code>)<code></code> &mdash;  Amplitude of the sine function.
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">offset</span>:Number</code> (default = <code>0</code>)<code></code> &mdash;  Center of the sine function.
   </td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>Number</code> &mdash; R sin(phase) + offset.
   </td>
</tr>
</table>
</div>
<a name="interpolate()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">interpolate</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public static function interpolate(x1:Number, y1:Number, x2:Number, y2:Number, x3:Number, usePercentage:Boolean = false):Number</code><p>
   Interpolates between/beyond (x1, y1) and (x2, y2).
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">x1</span>:Number</code> &mdash;  First X value.
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">y1</span>:Number</code> &mdash;  First Y value.
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">x2</span>:Number</code> &mdash;  Second X value.
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">y2</span>:Number</code> &mdash;  Second Y value.
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">x3</span>:Number</code> &mdash;  Third X value.
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">usePercentage</span>:Boolean</code> (default = <code>false</code>)<code></code> &mdash; Whether x3 is absolute value or relative value.
   </td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>Number</code> &mdash; Third Y value.
   </td>
</tr>
</table>
</div>
<a name="linearLoop()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">linearLoop</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public static function linearLoop(x1:Number, y1:Number, x2:Number, y2:Number, x3:Number, usePercentage:Boolean = false):Number</code><p>
   Interpolates between (x1, y1) and (x2, y2). Same as interpolate(), only that the third Y value is looped between y1 and y2.
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">x1</span>:Number</code> &mdash;  First X value.
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">y1</span>:Number</code> &mdash;  First Y value.
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">x2</span>:Number</code> &mdash;  Second X value.
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">y2</span>:Number</code> &mdash;  Second Y value.
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">x3</span>:Number</code> &mdash;  Third X value.
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">usePercentage</span>:Boolean</code> (default = <code>false</code>)<code></code> &mdash; Whether x3 is absolute value or relative value.
   </td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>Number</code> &mdash; Third Y value.
   </td>
</tr>
</table>
</div>
<a name="prob()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">prob</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public static function prob(p:Number):Boolean</code><p>
   Returns a Boolean value, with a probability equal to true.
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">p</span>:Number</code> &mdash;  The true probability. This value should lies between 0 and 1.
   </td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>Boolean</code> &mdash; The Boolean value.
   </td>
</tr>
</table>
</div>
<a name="pseudoGaussian()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">pseudoGaussian</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public static function pseudoGaussian(mean:Number, deviation:Number, iterations:int = 3):Number</code><p>
   Simulates Gaussian sample distribution.
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">mean</span>:Number</code> &mdash;       Mean value of sample.
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">deviation</span>:Number</code> &mdash;  Deviation of sample.
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">iterations</span>:int</code> (default = <code>3</code>)<code></code> &mdash; Iterations of simulation.
   </td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>Number</code> &mdash; A Gaussian random number.
   </td>
</tr>
</table>
</div>
<a name="randomInt()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">randomInt</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public static function randomInt(max:uint):int</code><p>
   
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">max</span>:uint</code> &mdash;  The maximum value of the random integer.
   </td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>int</code> &mdash; A random integer between 0 and max.
   </td>
</tr>
</table>
</div>
<a name="setPrecision()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">setPrecision</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public static function setPrecision(value:Number, digit:int, includeInteger:Boolean = false):Number</code><p>
   Sets the decimal         precision of a Number.
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">value</span>:Number</code> &mdash;           Original value.
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">digit</span>:int</code> &mdash;           How many digits of precision.
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">includeInteger</span>:Boolean</code> (default = <code>false</code>)<code></code> &mdash;  Whether to count integer part as digits of precision.
   </td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>Number</code> &mdash; Number with specified precision.
   </td>
</tr>
</table>
</div>
<a name="sin()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">sin</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public static function sin(phase:Number, radius:Number = 1, offset:Number = 0):Number</code><p>
   Sine function with more parameters.
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">phase</span>:Number</code> &mdash;   Phase of the sine function.
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">radius</span>:Number</code> (default = <code>1</code>)<code></code> &mdash;  Amplitude of the sine function.
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">offset</span>:Number</code> (default = <code>0</code>)<code></code> &mdash;  Center of the sine function.
   </td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>Number</code> &mdash; R sin(phase) + offset.
   </td>
</tr>
</table>
</div>
<a name="uniformSample()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">uniformSample</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public static function uniformSample(mean:Number, deviation:Number, usePercent:Boolean = true):Number</code><p>
   Evenly distributed sample.
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">mean</span>:Number</code> &mdash;        Mean value of sapmle
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">deviation</span>:Number</code> &mdash;   Deviation of sample
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">usePercent</span>:Boolean</code> (default = <code>true</code>)<code></code> &mdash;  Whether deviation is absolute or relative (percentage).
   </td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>Number</code> &mdash; An evenly distributed random number between (mean - deviation) and (mean + deviation).
   </td>
</tr>
</table>
</div>
<br>
<br>
<hr>
<br>
<p></p>
<center class="copyright"> 
</center>
</div>
</body>
</html>
<!-- -->
